package com.zb.controller;

import com.zb.exceptions.BussinessException;
import com.zb.service.TbAdminService;
import com.zb.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName TbAdminController
 * @Description 控制器
 * @Author xm
 * @Date 2024/08/05 08:51
 **/
@RestController
@RequestMapping("/tb-admin-model")
@Api(value = "TbAdminController", tags = {"管理员控制器"})
public class TbAdminController {

    @Autowired
    public TbAdminService tbAdminModelService;

    @ApiOperation(value = "用户登录", notes = "登录接口")
    @PostMapping("/login")
    public R login(@RequestParam("username") String username, @RequestParam("passwd") String passwd) throws BussinessException {
        return tbAdminModelService.login(username, passwd);

    }


}
